package javabean.MerchantInfo;

import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel(description = "股东信息")
public class ShareHolderInfoList {

    @Alias("name")
    @ApiModelProperty(value = "股东姓名【示例值：张三】", required = true)
    @NotBlank(message = "name不能为空")
    @Length(min = 1, max = 32, message = "name 长度范围：1~32")
    private String name;

    @Alias("cert_type")
    @ApiModelProperty(value = "股东证件类型【参考《自然人证件类型》；支持00~11，以及12:营业执照；示例值：12】", required = true)
    @NotBlank(message = "certType不能为空")
    @Length(min = 1, max = 2, message = "certType 长度范围：1~2")
    private String certType;

    @Alias("cert_no")
    @ApiModelProperty(value = "股东证件号码【示例值：320926198512025014】", required = true)
    @NotBlank(message = "certNo不能为空")
    @Length(min = 1, max = 32, message = "certNo 长度范围：1~32")
    private String certNo;

    @Alias("cert_validity_type")
    @ApiModelProperty(value = "股东证件有效期类型【1:长期有效 0:非长期有效；示例值：1】", required = true)
    @NotBlank(message = "certValidityType不能为空")
    @Length(min = 1, max = 1, message = "certValidityType 长度范围：1~1")
    private String certValidityType;

    @Alias("cert_begin_date")
    @ApiModelProperty(value = "股东证件有效期起始日【格式yyyyMMdd；示例值：20201223】", required = true)
    @NotBlank(message = "certBeginDate不能为空")
    @Length(min = 1, max = 8, message = "certBeginDate 长度范围：1~8")
    private String certBeginDate;

    @Alias("cert_end_date")
    @ApiModelProperty(value = "股东证件有效期到期日【格式yyyyMMdd; 非长期有效时必填；示例值：20301223】", required = false)
    @Length(min = 1, max = 8, message = "certEndDate 长度范围：1~8")
    private String certEndDate;

}